﻿<ds:SlView
    x:Class="Themes.Default.MainPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:ds="clr-namespace:SmartSpace.UI.Silverlight;assembly=SmartSpace.UI.Silverlight"
    xmlns:my="clr-namespace:Themes.Default"
    mc:Ignorable="d"
    d:DesignHeight="1400" d:DesignWidth="1020" FontFamily="Microsoft YaHei,Arial,SimSun"> <!--FontFamily="Fonts/msyh.zip#Microsoft YaHei"-->

    <ds:SlView.Resources>
        <BitmapImage x:Key="IBNavigationCollapsed" UriSource="/Themes.Default;component/Resources/arrow_left.png" />
        <BitmapImage x:Key="IBNavigationExpanded" UriSource="/Themes.Default;component/Resources/arrow_right.png" />

        <Style x:Key="HeadLabelStyle" TargetType="sdk:Label">
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="sdk:Label">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ValidationStates">
                                    <VisualState x:Name="Valid"/>
                                    <VisualState x:Name="Invalid">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0:0:1.5" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentControl">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <SolidColorBrush Color="Red"/>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="RequiredStates">
                                    <VisualState x:Name="NotRequired"/>
                                    <VisualState x:Name="Required">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="FontWeight" Storyboard.TargetName="ContentControl">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="SemiBold"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ExpansionStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0"/>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Collapsed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="borderCollapsed">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="borderExpanded">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Expanded">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="borderCollapsed">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="borderExpanded">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border Name="borderCollapsed" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Padding="0">
                                <Button Margin="0" Padding="0" BorderThickness="0" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
                                </Button>
                            </Border>
                            <Border Name="borderExpanded" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Padding="{TemplateBinding Padding}">
                                <ContentControl x:Name="ContentControl" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" 
                                                Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" 
                                                FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" 
                                                HorizontalAlignment="{TemplateBinding HorizontalAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                                IsTabStop="False" VerticalAlignment="{TemplateBinding VerticalAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </ds:SlView.Resources>

    <Grid>
        <ds:SlBackground/>

        <toolkit:DockPanel x:Name="LayoutRoot" LastChildFill="True" Background="{x:Null}">
            <!-- header -->
            <Grid toolkit:DockPanel.Dock="Top" Background="#FFBFDBFF" Height="Auto" x:Name="LayoutHeader">
                <sdk:Label Name="borderLabel" Style="{StaticResource HeadLabelStyle}" BorderBrush="#FF6593cf" VerticalAlignment="Top" Height="90">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="auto"/>
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Visibility="Collapsed" Source="/Themes.Default;component/Resources/db_head_left.jpg" Stretch="None" />
                        <Grid Grid.Column="1">
                            <Grid.Background>
                                <ImageBrush ImageSource="/Themes.Default;component/Resources/db_head_c.png" />
                            </Grid.Background>
                        </Grid>
                        <Image Grid.Column="2" Source="/Themes.Default;component/Resources/db_head.png" Stretch="None" />
                    </Grid>
                </sdk:Label>
                <my:HeaderPanel x:Name="m_headerPanel" Height="113"/>
            </Grid>



            <Grid x:Name="LayoutBottom" toolkit:DockPanel.Dock="Bottom">
                <!--<Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>-->
                <!--<Grid MouseLeftButtonDown="OnGridMouseLeftButtonDown" Grid.Row="0" Height="33" Margin="0,0,3,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border BorderThickness="1,0,1,0" Margin="3,0,0,0"  Grid.Column="0">
                        <Grid>
                            <Grid.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFE7EFFF" Offset="0"/>
                                    <GradientStop Color="#FFB5DDFF" Offset="1"/>
                                    <GradientStop Color="#FFCEE3FF" Offset="0.516"/>
                                </LinearGradientBrush>
                            </Grid.Background>
                            <Image Source="./Resources/n1.png" HorizontalAlignment="Left" Margin="5,3,3,3" VerticalAlignment="Center" />
                            <TextBlock Text="通知公告" Margin="40,0,0,0" VerticalAlignment="Center" FontSize="14"/>
                        </Grid>
                    </Border>
                    <Border BorderThickness="1,0,1,0" Margin="3,0,0,0"  Grid.Column="1">
                        <Grid>
                            <Grid.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFE7EFFF" Offset="0"/>
                                    <GradientStop Color="#FFB5DDFF" Offset="1"/>
                                    <GradientStop Color="#FFCEE3FF" Offset="0.516"/>
                                </LinearGradientBrush>
                            </Grid.Background>
                            <Image Source="./Resources/n2.png" HorizontalAlignment="Left" Margin="5,3,3,3" VerticalAlignment="Center" />
                            <TextBlock Text="工作动态" Margin="40,0,0,0" VerticalAlignment="Center" FontSize="14"/>
                        </Grid>
                    </Border>
                    <Border BorderThickness="1,0,1,0" Margin="3,0,0,0"  Grid.Column="2">
                        <Grid>
                            <Grid.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFE7EFFF" Offset="0"/>
                                    <GradientStop Color="#FFB5DDFF" Offset="1"/>
                                    <GradientStop Color="#FFCEE3FF" Offset="0.516"/>
                                </LinearGradientBrush>
                            </Grid.Background>
                            <Image Source="./Resources/n3.png" HorizontalAlignment="Left" Margin="5,3,3,3" VerticalAlignment="Center" />
                            <TextBlock Text="规章制度" Margin="40,0,0,0" VerticalAlignment="Center" FontSize="14"/>
                        </Grid>
                    </Border>
                    <Border BorderThickness="1,0,1,0" Margin="3,0,0,0"  Grid.Column="3">
                        <Grid>
                            <Grid.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFE7EFFF" Offset="0"/>
                                    <GradientStop Color="#FFB5DDFF" Offset="1"/>
                                    <GradientStop Color="#FFCEE3FF" Offset="0.516"/>
                                </LinearGradientBrush>
                            </Grid.Background>
                            <Image Source="./Resources/n4.png" HorizontalAlignment="Left" Margin="5,3,3,3" VerticalAlignment="Center" />
                            <TextBlock Text="工作研究" Margin="40,0,0,0" VerticalAlignment="Center" FontSize="14"/>
                        </Grid>
                    </Border>
                    <Border BorderThickness="1,0,1,0" Margin="3,0,0,0"  Grid.Column="4">
                        <Grid>
                            <Grid.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFE7EFFF" Offset="0"/>
                                    <GradientStop Color="#FFB5DDFF" Offset="1"/>
                                    <GradientStop Color="#FFCEE3FF" Offset="0.516"/>
                                </LinearGradientBrush>
                            </Grid.Background>
                            <Image Source="./Resources/n5.png" HorizontalAlignment="Left" Margin="5,3,3,3" VerticalAlignment="Center" />
                            <TextBlock Text="交流园地" Margin="40,0,0,0" VerticalAlignment="Center" FontSize="14"/>
                        </Grid>
                    </Border>

                    <Image Name="m_imageCollape" Cursor="Hand" ToolTipService.ToolTip="点击隐藏通知公告栏!" Source="/Themes.Default;component/Resources/Notice.PNG" Stretch="Fill" HorizontalAlignment="Center"/>

                </Grid>-->
                <Grid Name="m_gridViewContainer">
                    <StackPanel>
                        <ds:SlViewContainer Name="m_viewContainer" MinHeight="100"/>
                        <!-- footer -->
                        <Border BorderThickness="0,1,0,0">
                            <Grid Name="LayoutFooter" Height="auto">
                                <Grid.Background>
                                    <ImageBrush ImageSource="/Themes.Default;component/Resources/Footer_bg.png" />
                                </Grid.Background>
                                <StackPanel Margin="3">
                                    <TextBlock Text="Copyright @ 2011 China National Petroleum Corporation. All rights reserved." HorizontalAlignment="Center" Padding="0"  />
                                    <TextBlock Text="中国石油天然气集团公司 版权所有" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Grid>
                        </Border>
                    </StackPanel>
                </Grid>
            </Grid>

            <!-- center -->
            <Grid toolkit:DockPanel.Dock="Left">
                <Grid x:Name="LayoutWorkArea">
                    <Grid.Background>
                        <ImageBrush ImageSource="/Themes.Default;component/Resources/bg.jpg" />
                    </Grid.Background>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <my:NavigatePanel x:Name="m_navigatePanel" Grid.Column="0" Margin="2,0,3,0"/>
                    <sdk:GridSplitter Name="m_gridSplitter" Grid.Column="0" Width="3" Background="#01000000" ShowsPreview="False" BorderThickness="0" IsTabStop="False" />
                    <my:WorkAreaPanel x:Name="m_workAreaPanel" Grid.Column="1" Margin="0,0,0,0"/>
                </Grid>
            </Grid>
        </toolkit:DockPanel>
        <Border Name="m_popupMessage" HorizontalAlignment="Right" VerticalAlignment="Bottom" BorderThickness="1" Visibility="Collapsed">
            <Grid Background="White">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border Grid.Row="0" BorderThickness="0,0,0,1">
                    <ds:SlToolbar HorizontalAlignment="Stretch">
                        <Grid HorizontalAlignment="Stretch">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="auto"/>
                            </Grid.ColumnDefinitions>
                            <StackPanel Orientation="Horizontal" Grid.Column="0">
                                <Image Source="./Resources/horn.png" Margin="5"/>
                                <TextBlock Text="任务提示" VerticalAlignment="Center" FontWeight="Bold" Width="180"/>
                            </StackPanel>
                            <Button Content="关闭" Grid.Column="1" Name="m_btnHideMessage" Click="m_btnHideMessage_Click" Margin="3"/>
                        </Grid>
                    </ds:SlToolbar>
                </Border>
                <ds:SlViewContainer x:Name="m_containerMessage" Grid.Row="1" Margin="10"/>
            </Grid>
        </Border>

    </Grid>
</ds:SlView>
